#ifndef CHIPPAGEPRESENTER_HPP
#define CHIPPAGEPRESENTER_HPP

#include <gui/model/ModelListener.hpp>
#include <mvp/Presenter.hpp>

using namespace touchgfx;

class ChipPageView;

class ChipPagePresenter : public touchgfx::Presenter, public ModelListener
{
public:
    ChipPagePresenter(ChipPageView& v);

    /**
     * The activate function is called automatically when this screen is "switched in"
     * (ie. made active). Initialization logic can be placed here.
     */
    virtual void activate();

    /**
     * The deactivate function is called automatically when this screen is "switched out"
     * (ie. made inactive). Teardown functionality can be placed here.
     */
    virtual void deactivate();

    virtual ~ChipPagePresenter() {};
		//更新芯片内部参数
		virtual void updateChipInfor(uint16_t newChipTempVal, uint16_t newVrefVal, uint16_t newVbatVal);
		void ChipPagePresenterState(bool enable);
		//物理按键的页面跳转
		virtual void ChipPageChange(uint8_t newFiveKeyFunc);
private:
    ChipPagePresenter();

    ChipPageView& view;
};

#endif // CHIPPAGEPRESENTER_HPP
